Repository navigation
Pull request review: verdict, breaking changes, line comments, and an optional model reading - #10
harsharajkumar-273 wants to merge 12 commits into
Conversation
The comment now lists callers under the edited symbol that reaches them, riskiest edit first, so a reviewer sees which change matters. Top-level code is labelled as such, the test command is shown once with how many of the project's test files it covers, and a change that touches most of the suite says so. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01ENHRK3kgqcVwqwyjswRViM
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
CodeGraph: what this change can reachVerdict: 🟠 may change public API. Nothing in this repository is known to break; if these are used from outside it, they may:
14 symbols in 12 files you did not edit could be affected by the 19 existing symbols this change edits (🟢 14 proven · 🟡 0 probable · 🔴 0 guessed by name). Which edit reaches whom
Also: edits top-level code in 15 files; adds 195 new symbols. 13 of 15 test files to runThat is most of the suite: this change touches widely used code. npx vitest run packages/analysis/test/analysis.test.ts packages/cli/test/ai.test.ts packages/cli/test/cli.test.ts packages/cli/test/inline.test.ts packages/cli/test/workspace.test.ts packages/extractors/test/browser-parity.test.ts packages/extractors/test/collisions.test.ts packages/extractors/test/go.test.ts packages/extractors/test/python.test.ts packages/extractors/test/typescript.test.ts packages/extractors/test/variables.test.ts packages/web/test/model.test.ts packages/web/test/sources.test.tsStatic analysis of calls and imports (TypeScript, JavaScript, Python, Go). 🟡 and 🔴 links are name matches, so check them before relying on them. Dynamic calls are invisible to it. CodeGraph |
The first real run showed '1 symbols in 1 files', '1 of 11 test file', and a list jammed against the code fence. The action's headline pattern now accepts the singular so the fail-above limit still reads it. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01ENHRK3kgqcVwqwyjswRViM
The pull request comment now indexes the base commit too and lists any function that existed before, is gone now, and has a surviving caller that still calls the old name: a rename that missed a caller. A name the caller already called without resolving in the base (an external get) is not reported, which removes the main way this check could cry wolf. On 132 real commits from five repositories it flagged nothing, and on a rename injected into Requests, Hono and Gin it named the real callers. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01ENHRK3kgqcVwqwyjswRViM
Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01ENHRK3kgqcVwqwyjswRViM
The comment now opens with whether existing callers can fail: likely breaking, may change public API, changes shared code, or contained or additive. A function whose argument counts changed is checked against how many arguments each call site passes, so the comment names the calls that no longer fit instead of guessing. Argument counts are recorded for TypeScript, JavaScript, Python and Go. Symbols that only moved to another file are no longer reported as removed, symbols that the base commit lacks are new even when git merges them into an edited hunk, and leading-underscore Python names are not public. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01ENHRK3kgqcVwqwyjswRViM
A removed function that is still called is commented on its deleted definition, since the caller that was missed sits in a file the pull request did not touch and GitHub only takes comments on diff lines. A changed signature is commented on the new signature, naming the calls that no longer fit. Public API removed is commented on the deleted lines. Comments are replaced on each push and left alone once someone has replied. The action now analyses the pull request's own commit in a worktree instead of the merge commit, so its line numbers match GitHub's diff. A note on edits to widely used code is opt-in (inline-comments: all): on 118 real commits it would have fired on about one in seven, which is noise, while the default fired on none. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01ENHRK3kgqcVwqwyjswRViM
With an Anthropic API key the comment gains a short reading: what the change does in plain language, whether the diff matches the author's description, and what to check. The deterministic verdict and facts go to the model as ground truth and do not depend on it. Off unless a key is set, and never used for a pull request from a fork. The title, description and diff are written by whoever opens the pull request, so they are quoted as untrusted data the model is told never to obey, closing tags inside them are neutralised, and the answer is stripped of markup, links and mentions before it is shown. A failing call never blocks the comment, and the key is never printed. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01ENHRK3kgqcVwqwyjswRViM
…x that follows the checkout
…d limits Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01ENHRK3kgqcVwqwyjswRViM
| }; | ||
|
|
||
| export function buildTools(getGraph: () => Promise<{ graph: CodeGraph; root: string }>, reindex: () => void): Tool[] { | ||
| export function buildTools(ws: Workspace): Tool[] { |
There was a problem hiding this comment.
🟠 buildTools now accepts at most 1 argument. Every call in this repository already fits; if it is used from outside, it may not.
CodeGraph: static analysis of calls; check before relying on it.
…es, not call edges Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01ENHRK3kgqcVwqwyjswRViM
Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01ENHRK3kgqcVwqwyjswRViM
What this adds
codegraph_check_change(checks an edit before it is written, from the new file text, nothing written to disk),codegraph_verify_symbol,codegraph_repo_map; the server's index follows the files on disk.docs/AGENT-EVAL.md, a mutation test with the TypeScript compiler as ground truth. On this repo: 100% of removals and 88% of added required parameters caught, 0 false alarms on 40 harmless edits. Known gaps: React components used as JSX are not connected, and 73% call-site recall on removals. One repository only (the one it was built on); no Python/Go run and no agent A/B yet.Tests
199 pass;
tsc --noEmitclean.🤖 Generated with Claude Code
https://claude.ai/code/session_01ENHRK3kgqcVwqwyjswRViM